{include file="public/header" /}
<body class="hide-top bgc">
<div class="submit-container">
    <img src="/static/index/img/icon78.png" alt="">
    <div class="submit-content">
        <div class="submit-hd flex-center">
            <i class="layui-icon layui-icon-left"></i>订单详情
        </div>

        <div class="order-det-staute">
            <p class="order-det-status">{$info.friendlyText}</p>
        </div>

        <div class="submit-site flex-layout order-det-site">
            <div>
                <div>
                    <img src="/static/index/img/icon56.png" alt="">{$info.receiver} {$info.receiver_tel}
                </div>
                <p>{$info.p.title}{$info.c.title}{$info.d.title}{$info.address_details}</p>
            </div>
        </div>

        <div class="submit-pro">
            <ul class="submit-pro-list">
                {foreach name="info.productsField" item="vo"}
                <li>
                    <p class="flex-center">
                        <img src="{$vo.icon}" alt="">
                    </p>
                    <div class="center">
                        <p class="multi">{$vo.title}</p>
                        <p class="spec">{$vo.spec}</p>
                    </div>
                    <div class="rgt">
                        <p class="price">￥<span>{$vo.vip_price}</span></p>
                        <p>x{$vo.num}</p>
                    </div>
                </li>
                {/foreach}
            </ul>
            <ul class="submit-pro-form">
                <li>买家留言：{$vo.remark?:''}</li>
            </ul>
        </div>

        <div class="submit-pro">
            <ul class="submit-pro-form">
                <li>商品总额
                    <p>￥{$info.real_amount - $info.freight}</p>
                </li>
                <li>总运费
                    <p>￥{$info.freight}</p>
                </li>
                <li class="real-money">实付款：<span>￥{$info.real_amount}</span></li>
            </ul>
        </div>

        <ul class="order-det-form">
            <li>
                <p class="name">订单编号：</p>
                <p id="copy">{$info.sn}</p>
            </li>

            <li>
                <p class="name">下单时间：</p>
                <p>{$info.create_time}</p>
            </li>
            {if $info.statusCode > 1}
            <li>
                <p class="name">支付方式：</p>
                <p>{$info.pay_way}</p>
            </li>
            <li>
                <p class="name">支付时间：</p>
                <p>{$info.pay_time}</p>
            </li>
            {/if}
            {if $info.statusCode > 2}
            <li>
                <p class="name">发货时间：</p>
                <p>{$info.post_time}</p>
            </li>
            <li>
                <p class="name">物流公司：</p>
                <p>{$info.express.title}</p>
            </li>
            <li>
                <p class="name">物流单号：</p>
                <p>{$info.express_code}</p>
            </li>

            {/if}
            {if $info.statusCode > 3}
            <li>
                <p class="name">收货时间：</p>
                <p>{$info.receipt_time}</p>
            </li>
            {/if}

        </ul>
    </div>
</div>

<div class="orderDet-footer">
    {if $info.statusCode == 1}
    <p class="flex-center clear">取消订单</p>
    <p class="flex-center bc" onclick="load_href('{:url(\'order/payment\')}?id={$info.id}',2)">立即付款</p>
    {/if}
    {if $info.statusCode == 3}
    <p class="flex-center bc edit receipt">确认收货</p>
    {/if}
</div>

</body>
{include file="public/footer"/}
<script>
    $(".clear").click(function () {
        edit('clear', '确认要取消订单吗？')
    })
    $(".receipt").click(function () {
        edit('receipt', '是否确认收货？')
    })

    function edit(type, msg) {
        layer.confirm(msg, {title: '请确认'}, function () {
            return common.request('{:url("order/edit")}', {type: type, id: '{$info.id}'});
        });
    }
</script>
</html>